The present invention relates to a data recording and/or reproducing technique and, more particularly, to such technique in which a multiplexed stream such as a transport stream and information pertaining to a maximum rate thereof may be stored onto a recording medium during a recording operation and the stored multiplexed stream is outputted by way of a digital interface during a reproducing operation in accordance with the maximum rate information.
In digital television broadcasting such as digital video broadcasting (DVB), digital television (DTV) or the like, a transport stream such as in MPEG2 systems (ISO/IEC 13818-1) may be utilized for multiplexed data. In such transport stream, video and audio streams may be multiplexed in units of transport packets each having 188 bytes. Additionally, transport packets of a plurality of independent television programs can be multiplexed in one transport stream.
FIG. 5 illustrates a reception system for receiving a digital television broadcast program. Such digital television broadcast reception system may include an integrated receiver/decoder (IRD) 101 which may receive a transport stream, and a transport stream recording and reproducing apparatus 102 which may write and/or read transport packets of a television program into and/or from a storage medium. The IRD 101 and transport stream recording and reproducing apparatus 102 may be connected to a digital interface to transmit and receive the transport packets. For example, the IRD 101 and transport stream recording and reproducing apparatus 102 may have IEEE 1394 adapters 103 and 104 respectively connected thereto so as to enable the transmission and reception of the transport packets therebetween by way of an IEEE 1394 interface.
A transport stream received by the IRD 101 may have multiplexed transport packets of a plurality of television programs. The IRD 101 may extract from the received transport stream the transport packets of one or more television programs selected by a user. The stream comprising the transport packets extracted by the IRD 101 is referred to as a “partial transport stream”. The partial transport stream may be isochronously transferred from the IRD 101 by way of the IEEE 1394 interface to the transport stream recording and reproducing apparatus 102 which may write the same into a storage medium. If the transport stream transmitted by digital television broadcasting has been statistically multiplexed, the partial transport stream may be transferred at a variable bit rate.
Transport packets of one or more television programs extracted from a transport stream having a plurality of multiplexed television programs may appear at irregular intervals. As an example, consider the situation in which transport packets of a plurality of channels (such as four channels for programs A to D) have been multiplexed in a transport stream and transmitted by way of a satellite as shown in FIG. 6. In such situation, transport packets (Ai) of the program A extracted from the transport stream may appear at irregular intervals. That is, as representatively shown in FIG. 6, an interval t1 between transport packets A1 and A2, an interval t2 between transport packets A2 and A3, an interval t3 between transport packets A3 and A4, and an interval t4 between transport packets A4 and A5, are not identical to each other.
If the transport stream recording and reproducing apparatus 102 writes the extracted transport packets Ai into a storage medium, the storage capacity of the storage medium may not be effectively utilized if the intervals between the transport packets Ai are relatively long and/or unequal. To more effectively utilize the storage medium capacity, the intervals of the transport packets Ai may be reduced and such packets may be written into the storage medium. However, if the stored transport packets Ai with reduced intervals are read, the read output packets may not have the same timing arrangement as when they had been transmitted and, as a result, they may not be supplied to a transport-system target decoder (T-STD) defined in MPEG2 in the same timing arrangement as when they had been encoded. As a result, a buffer of the T-STD may experience an overflow or underflow condition and may eventually fail.
To enable transport packets Ai to be output in the same timing arrangement as when they had been transmitted, the transport stream recording and reproducing apparatus 102 may record a time stamp counter TSi synchronous with a program clock reference (PCR) in each of the transport packets Ai, as shown in FIG. 6.
A further description of the transport stream recording and reproducing apparatus 102 will now be provided.
A consumer-use digital cassette recorder (VCR) which uses a digital video cassette (DVC) as a storage medium may be utilized as the transport stream recording and reproducing apparatus 102.
The transport stream recording and reproducing apparatus 102 may have a recording system or portion as shown in FIG. 7. As shown therein, the recording portion of the transport stream recording and reproducing apparatus 102 may include a terminal 111 to which a partial transport stream may be supplied from the IRD 101 by way of the IEEE 1394 interface, a bit stream analysis circuit 112 for analyzing the partial transport stream supplied from the terminal 111, a phase-locked loop (PLL) circuit 113 for generating a 27 MHz clock signal synchronous with the PCR added to the partial transport stream, a time stamp generation circuit 114 for generating a time stamp synchronous with the PCR in accordance with the clock signal from the PLL 113, a time stamp addition circuit 115 for adding the time stamp from the time stamp generation circuit 114 to each packet in the partial transport stream supplied by way of the bit stream analysis circuit 112. Additionally, the transport stream recording and reproducing apparatus 102 may include a smoothing buffer 116 for temporarily storing a data stream to which the time stamp has been added by the time stamp generation circuit 115, a multiplexing circuit 117 for multiplexing the data stream stored in the smoothing buffer 116 and a stuffing byte(s) to produce a data stream having a constant bit rate, an error correction code (ECC) circuit 118 for adding an error correction code to the multiplexed data, stream, and a recording circuit 119 for writing the data stream output from the ECC 118 into a storage medium 120.
The recording portion of the transport stream recording and reproducing apparatus 102 and/or operation thereof will now be further described.
The partial transport stream received at the terminal 111 is supplied to the bit stream analysis circuit 112 which may read a standard reference time PCR if included in the transport packets of the partial transport stream. The bit stream analysis circuit 112 may supply the transport packets to the time stamp addition circuit 115 and the PCR to the PLL circuit 113. The PLL circuit 113 may generate a 27 MHz clock signal in synchronous with the received PCR and may provide the same to the time stamp generation circuit 114 which, in turn, may count clocks or pulses of the received clock signal and may generate a time stamp corresponding to such count. The time stamp may be supplied to the time stamp addition circuit 115.
The time stamp addition circuit 115 may add the received time stamp to each of the packets in the partial transport stream supplied from the bit stream analysis circuit 112. More specifically, the time stamp addition circuit 115 may add a so-called TSP_extra_header which may include 3 bytes of data to 187 bytes of the 188 byte-long transport packet(s) in which the leading 1 sync byte is deleted so as to generate a block having 190 bytes, as shown in FIG. 8. The TSP_extra_header may have a 3 bit reserve area and a 21 bit time stamp counter arranged as shown in FIG. 9. The time stamp counter may indicate the time at which a first bit of a first byte of the transport packet may arrive at the input of the smoothing buffer as defined in ISO/IEC 13818-1. It should be noted that the format shown in FIG. 8 is for a transport stream recording system which may be applied to a consumer-use digital VCR (video cassette recorder) which may use a cassette tape and that a different format may be utilized for a transport stream recording system if applied differently and/or with a different recording medium.
The data output from the time stamp addition circuit 115 may be stored in the smoothing buffer 116. The smoothing buffer 116 may output the stored data at a predetermined bit rate to the multiplexing circuit 117 and the smoothing buffer will output no data to the multiplexing circuit if there is none stored therein. In this latter situation, to maintain a constant bit rate as defined by the recording format of the digital VCR, dummy data may be inserted or stuffed (“byte stuffing”) into the multiplexing circuit 117 so that the output bit rate is equal to a predetermined recording rate. That is, if the bit rate of a partial transport stream is lower than a predetermined fixed recording rate, dummy data may be inserted so that data may be recorded at the predetermined rate. For example, when operating in a standard television mode, the digital VCR may record in any one of three different modes: a standard (SD) mode (25 Mbps), ½-SD mode (12.5 Mbps), and a ¼-SD mode (6.25 Mbps) depending upon the recording bit rate. In the DVB (digital video broadcasting) system, since programs may be transmitted at a rate lower than 9 Mbps, the transport stream recording and reproducing apparatus 102 may use the ½-SD mode whereupon the multiplexing circuit 117 may provide data at 12.5 Mbps.
The stream output from the multiplexing circuit 117 may have an error correction code added thereto by the ECC circuit 118. The output of the ECC circuit 118 may be supplied to the recording circuit 119 so as to be written into the storage medium 120.
The transport stream recording and reproducing apparatus 102 may include a reproduction system or portion as shown in FIG. 10. As shown therein, the reproduction portion of the transport stream recording and reproducing apparatus 102 may include a reproduction circuit 121 for reading a data stream recorded in the storage medium 120, an ECC circuit 122 for performing error correction on the data stream outputted by the reproduction circuit 121, a demultiplexing circuit 123 for separating the stuffing byte or bytes from the error-corrected data stream so as to provide a data stream having only the partial transport stream, and a time stamp separation circuit 124 for separating the added time stamp from each packet of the partial transport stream outputted by the demultiplexing circuit 123. The transport stream recording and reproducing apparatus 102 may further include a clock generation circuit 125 for generating a clock signal having a predetermined frequency such as 27 MHz in a free-running manner, a timing generation circuit 126 which may have a counter for counting clocks or pulses of the clock signal generated by the clock generation circuit 125 from the initial or first time stamp separated by the time stamp separation circuit 124, a comparison circuit 127 for comparing a time stamp separated by the time stamp separation circuit 124 and the count determined by the timing generation circuit 126, and an output control circuit 128 for outputting by way of a terminal 129 each packet in the partial transport stream from which the time stamp has been separated by the time stamp separation circuit 124 at a time(s) based on the comparison result obtained from the comparison circuit 127. In addition, the transport stream recording and reproducing apparatus 102 may also include a central processing unit (CPU) 130 for detecting or determining a recording mode and for supplying such recording mode information to the IEEE 1394 interface by way of a control terminal 131.
A reproduction operation of a partial transport stream will now be described.
To reproduce a partial transport stream written in the storage medium 120, the reproduction circuit 121 may initially read from the storage medium 120 information indicative of the mode in which the partial transport stream had been recorded. Such recording mode information may be error corrected by the ECC circuit 122 and then supplied to the CPU 130. In response thereto, the CPU 130 may generate a control signal indicative of the recording mode and may supply the same to the IEEE 1394 adapter 104 (FIG. 5). In response to such control signal, the IEEE 1394 adapter 104 may reserve a data transfer rate for the digital interface in accordance with the recording mode. For example, when the recording mode is the ½-SD mode, the IEEE 1394 adapter 104 may reserve a data transfer rate of 12.5 Mbps.
The transport stream recorded on the storage medium 120 may be read by the reproduction circuit 121, subjected to error correction by the ECC circuit 122, and then have the stuffing byte(s) removed by the demultiplexing circuit 123. The transport stream with the stuffing byte(s) removed may be supplied to the time stamp separation circuit 124 whereupon it will be separated into a number of transport packets and time stamps. The transport packet(s) may be supplied to the output control circuit 128 while the time stamp(s) may be supplied to the comparison circuit 127 and timing generation circuit 126.
The counter of the timing generation circuit 126 may count clocks or pulses of the 27 MHz clock signal generated by the clock generation circuit 125 from an initial value determined by the time stamp. The obtained count value may be supplied to the comparison circuit 127. When the value of a time stamp supplied from the time stamp separation circuit 124 coincides with the count value supplied from the timing generation circuit 126, the comparison circuit 127 may control the output control circuit 128 to allow the transport packet(s) supplied from the time stamp separation circuit 124 to be supplied to terminal 129. For example, if the storage medium 120 has the partial transport stream shown in FIG. 6 stored therein, the comparison circuit 127 may control the output control circuit 128 to provide the transport packet A1 when the count output from the timing generation circuit 126 becomes TS1, to provide the transport packet A2 when the count output becomes TS2, to provide the transport packet A3 when the count output becomes TS3, to provide the transport packet A4 when the count output becomes TS4, to provide the transport packet A5 when the count output becomes TS5, and so forth. As such, the transport packets Ai may be provided in the same time sequence or timing arrangement as that in which they had been encoded. As a result, the above-described failures of the T-STD may be prevented.
With reference back to FIG. 5, the partial transport stream provided by the transport stream recording and reproducing apparatus 102 may be isochronously transferred from the IEEE 1394 adapter 104 to the IEEE 1394 adapter 103. The IEEE 1394 adapter 103 may supply the received transport stream to the IRD 101 which, in turn, may decode it so as to reproduce video and audio signals.
In the transport stream recording and reproducing apparatus 102, if the bit rate of a transport stream supplied thereto for recording is lower than the predetermined fixed recording rate, dummy data may be inserted so as to enable data recording at the predetermined rate. Also, with regard to the outputting of a partial transport stream to the digital interface by the transport stream recording and reproducing apparatus 102, the predetermined recording rate may be reserved for the rate of data transfer by way of the digital interface. Thus, in the transport stream recording and reproducing apparatus 102, even if the maximum bit rate for the partial transport stream obtained after the removal of the dummy data from the recorded data is lower than the predetermined recording rate (which may, for example, be 12.5 Mbps in the ½-SD mode), the predetermined recording rate may be reserved for the data transfer rate for outputting the transport stream by way of the digital interface. As a result, the digital interface band may not be effectively utilized.